# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit thexgames

DESCRIPTION="Some more eye candy to the X3"
HOMEPAGE="http://www.elite-games.ru/x3/scripts/mods.shtml#FashionMOD"
SRC_URI="!mini? ( http://www.elite-games.ru/_egm_scripts/url.php?action=gotourl&url=/downloads/x3/scripts/mods/fashionmod_bykrim.rar )
		mini? ( http://www.elite-games.ru/_egm_scripts/url.php?action=gotourl&url=/downloads/x3/scripts/mods/fashionmini.rar )"

LICENSE="as-is"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="mini"

RDEPEND="games-strategy/x3"
DEPEND="app-arch/unrar
		app-arch/p7zip
	${RDEPEND}"

src_unpack()
{
	unpack ${A}
	for i in $(ls *.exe | sed 's|\.exe||')
	do
		mv "${i}".exe "${i}".7z
		unpack ./"${i}".7z
		rm ./"${i}".7z
	done
}
